from django.shortcuts import render
# Create your views here
from .models import Book
from django.http import HttpResponse

from django.template import Template, Context


def index(request):
    pass


def pub(request):
    context = {"post": '1432354345345345'}
    return render(request, 'index.html', context)


def get_book(request):
    book_list = Book.objects.order_by('-pub_date')[:10]
    return render(request, 'getbook.html', {"book_list": book_list})
